<template>
	<view class="container">
		<!-- =====================================头部===================================== -->
		<view class="header">
			<view class="title">可提现金额（元）</view>
			<view class="money">￥<text>{{wallert_info.flea_money}}</text></view>
		</view>
		<!-- =====================================头部===================================== -->
		<view class="tixian">
			<view class="jine">提现金额</view>
			<view class="txje">
				<view style=" font-size: 60rpx;">￥</view>
				<input v-model="money" type="number" value="" />
				<view style="color: #FFB200;" @click="all_takeout">全部提现</view>
			</view>
			<view class="txz">
				<view>提现至</view>
				<view>
					<image src="https://community.chuangxiangdianli.com/images/neighborimg/market/mine/wallert/weiixn.png" mode=""></image>
					<text>微信</text>
				</view>
			</view>
			<view class="txBtn" @click="Withdrawal">提现</view>
			<view class="txjl" @click="go_Withdrawal_info">提现记录</view>
		</view>
		<!-- =====================================头部===================================== -->
		<view class="zhuyi">
			<view class="title">体现说明:</view>
			<view class="ss">1、提现成功后。24小时内发送通知</view>
			<view class="ss">2、提现规则</view>
			<view class="ss">3、规则及时联系</view>
		</view>
	</view>
</template>

<script>
	// 引入封装的请求
	import request from '@/utils/request.js'	
	export default{
		data(){
			return {
				wallert_info:{
					flea_money:0,
					amount_income:0,
					takeout_money:0
				},
				// 当前提现的金额
				money:0
			}
		},
		onShow() {
			this.get_wallert_info()
		},
		methods:{
			// 点击提现
			Withdrawal(){
				let that = this
				request.post({
					url:'Mini/circle/flea/fleaWallet',
					data:{
						money:that.money
					}
				}).then(res=>{
					uni.showToast({
						title:res.msg
					})
					// console.log(res)
					if(res.code==200){
						uni.navigateBack()
					}
				})
			},
			// 查看提现记录
			go_Withdrawal_info(){
				uni.navigateTo({
					url:'/neighbor/market/mine/wallert/ttixianDetail'
				})
			},
			// 获取钱包信息
			get_wallert_info(){
				let that = this
				request.get('Mini/circle/flea/fleaWallet').then(res=>{
					if(res.code==200){
						that.wallert_info = res.data
					}
				})
			},
			// 点击全部提现 
			all_takeout(){
				this.money = this.wallert_info.flea_money
			}
		}
	}
</script>

<style lang="scss" scoped>
	.header{
		height: 430rpx;
		width: 100%;
		padding: 0 30rpx;
		box-sizing: border-box;
		background: linear-gradient(119deg, #FCB51E, #F8C442);
		.title{
			padding: 30rpx 0;
			box-sizing: border-box;
			font-size: 24rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
		}
		.money{
			font-size: 24rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
			&>text{
				font-size: 48rpx;
			}
		}
	}
	.tixian{
		width: calc(100% - 60rpx);
		padding: 43rpx 55rpx;
		margin: -200rpx auto;
		background-color: #fff;
		border-radius: 20rpx;
		box-shadow: 0px 4rpx 24rpx 0px rgba(107, 107, 107, 0.22);
		.jine{
			font-size: 26rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #333333;
			margin-bottom: 40rpx;
		}
		.txje{
			display: flex;
			flex-direction: row;
			justify-content: flex-start;
			align-items: center;
			width: 100%;
			// height: 78rpx;
			padding-bottom: 34rpx;
			box-sizing: border-box;
			border-bottom: 1rpx solid rgba(51,51,51, .3);
			font-size: 26rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #333333;
			&>input{
				flex: 1;
				height: 100%;
				font-size: 50rpx;
			}
		}
		.txz{
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: center;
			height: 41rpx;
			font-size: 26rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #333333;
			margin: 40rpx 0;
			&>view:nth-child(2){
				&>image{
					height: 41rpx;
					width: 41rpx;
					display: inline-block;
					margin-right: 15rpx;
				}
			}
		}
		.txBtn{
			width: 100%;
			height: 70rpx;
			background: linear-gradient(119deg, #FCB51E, #F8C442);
			border-radius: 35rpx;
			text-align: center;
			line-height: 70rpx;
			font-size: 30rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
			margin-bottom: 50rpx;
		}
		.txjl{
			width: 100%;
			text-align: right;
			font-size: 30rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #999999;
		}
	}
	.zhuyi{
		margin-top: 230rpx;
		width: 100%;
		padding: 0 61rpx;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #999999;
		.ss{
			font-size: 26rpx;
		}
	}
</style>
